﻿using Newtonsoft.Json;
using System.Text.Json.Serialization;

namespace ThresholdAssistant.WebAPI.Models
{
    /// <summary>
    /// 
    /// </summary>
    public class TemplateMessage
    {
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("touser"), JsonPropertyName("touser")]
        public string ToUser { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("template_id"), JsonPropertyName("template_id")]
        public string TemplateId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("data"), JsonPropertyName("data")]
        public TemplateMessageData Data { get; set; }
    }

    /// <summary>
    /// 模板消息数据
    /// </summary>
    public class TemplateMessageData
    {
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("thing1"), JsonPropertyName("thing1")]
        public TemplateMessageDataValue Thing1 { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("time2"), JsonPropertyName("time2")]
        public TemplateMessageDataValue Time2 { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("thing4"), JsonPropertyName("thing4")]
        public TemplateMessageDataValue Thing4 { get; set; }
    }

    /// <summary>
    /// 模板消息数据值
    /// </summary>
    public class TemplateMessageDataValue
    {
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("value"), JsonPropertyName("value")]
        public string Value { get; set; }
    }

}
